﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="ihongma.Web.UI.Page.usercenter" ValidateRequest="false" %>
<%@ Import namespace="System.Collections.Generic" %>
<%@ Import namespace="System.Text" %>
<%@ Import namespace="System.Data" %>
<%@ Import namespace="ihongma.Common" %>

<script runat="server">
override protected void OnInit(EventArgs e)
{

	/* 
		This page was created by ihongma Template Engine at 2014/4/1 20:02:48.
		本页面代码由ihongma模板引擎生成于 2014/4/1 20:02:48. 
	*/

	base.OnInit(e);
	StringBuilder templateBuilder = new StringBuilder(220000);
	templateBuilder.Append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n<title>会员中心 - ");
	templateBuilder.Append(Utils.ObjectToStr(config.webname));
	templateBuilder.Append("</title>\r\n<meta content=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webkeyword));
	templateBuilder.Append("\" name=\"keywords\" />\r\n<meta content=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webdescription));
	templateBuilder.Append("\" name=\"description\" />\r\n<link media=\"screen\" type=\"text/css\" href=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/css/user.css\" rel=\"stylesheet\" />\r\n\r\n  <!--css-->\r\n");

	templateBuilder.Append("<link rel=\"stylesheet\" href=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/css/style.css\" type=\"text/css\"\r\nmedia=\"screen\" />\r\n<link rel=\"stylesheet\" media=\"screen and (max-width:991px)\" href=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/css/max991.css\"\r\n/>\r\n<link rel=\"stylesheet\" media=\"screen and (max-width:479px)\" href=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/css/max479.css\"\r\n/>\r\n\r\n<link rel=\"stylesheet\" href=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/css/nivo-slider.css\" type=\"text/css\" media=\"screen\" />\r\n<script src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/js/jquery-1.10.2.min.js\"></");
	templateBuilder.Append("script>\r\n\r\n<!--[if lt IE 8]>\r\n    <script type=\"text/javascript\" src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/js/DD_belatedPNG_0.0.8a-min.js\">\r\n    </");
	templateBuilder.Append("script>\r\n    <script>\r\n        DD_belatedPNG.fix(\"h1, a, h2, h3, img,.fixpng,.videos li\");\r\n    </");
	templateBuilder.Append("script>\r\n<![endif]-->\r\n<!--[if lt IE 9]>\r\n    <script src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/js/html5.js\">\r\n    </");
	templateBuilder.Append("script>\r\n    <script src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/js/css3-mediaqueries.js\">\r\n    </");
	templateBuilder.Append("script>\r\n<![endif]-->");


	templateBuilder.Append("\r\n<!--/css-->\r\n<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/lhgdialog/lhgdialog.js?skin=idialog_1\"></");
	templateBuilder.Append("script>\r\n<script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/calendar.js\"></");
	templateBuilder.Append("script>\r\n<script type=\"text/javascript\" src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/js/base.js\"></");
	templateBuilder.Append("script>\r\n</head>\r\n\r\n<body>\r\n<div class=\"wrapper\">\r\n    <!--Header-->\r\n");

	templateBuilder.Append("<div id=\"header\" class=\"contentHead\">\r\n    <div class=\"center_wrapper\">\r\n      <div class=\"juiceUplogo\">\r\n        <div id=\"lg_indicator\">\r\n      <span class=\"menu_open_button\"><img class=\"button\" src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/menu_open_button.jpg\" width=\"76\" height=\"40\" /></span><a href=\"/\"><img src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/xhm_logo.jpg\" width=\"95\" height=\"59\"></a>\r\n        </div>\r\n        <div id=\"lg\">\r\n          <a href=\"/\"><img src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/juiceUp_logo.gif\"></a>\r\n        </div>\r\n      </div>\r\n    </div>\r\n      \r\n    <div class=\"topLinks\">\r\n      <div class=\"center_wrapper\">\r\n        <div class=\"topNews\">New. 现北京地区支持在线订购，其他城市即将开通，敬请关注。</div>\r\n        <div class=\"language\"><!--<a href=\"#\">English</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"#\" class=\"selected\">中文</a>--></div>\r\n        <div class=\"login\" id=\"menu\">\r\n        <span class=\"tel\"> 客服热线：400-082-5955</span>\r\n      \r\n        <!--  <a href=\"#\">注 册</a>\r\n          <a href=\"#\" id=\"menu\">登 录</a>-->\r\n         \r\n\r\n        </div>\r\n        <script type=\"text/javascript\">\r\n            $.ajax({\r\n                type: \"POST\",\r\n                url: \"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("tools/submit_ajax.ashx?action=user_check_login\",\r\n                dataType: \"json\",\r\n                timeout: 20000,\r\n                success: function (data, textStatus) {\r\n                    if (data.status == 1) {\r\n                        $(\"#menu\").append('<a href=\"");
	templateBuilder.Append(linkurl("usercenter","exit"));

	templateBuilder.Append("\">退出</a>');\r\n                        $(\"#menu\").append('<a href=\"");
	templateBuilder.Append(linkurl("usercenter","index"));

	templateBuilder.Append("\">我的JuiceUp</a>');\r\n                    } else {\r\n                        $(\"#menu\").append('<a href=\"");
	templateBuilder.Append(linkurl("register"));

	templateBuilder.Append("\">注册</a>');\r\n                        $(\"#menu\").append('<a href=\"");
	templateBuilder.Append(linkurl("login"));

	templateBuilder.Append("\">登录</a>');\r\n                    }\r\n                }\r\n            });\r\n    </");
	templateBuilder.Append("script>\r\n      </div>\r\n    </div>\r\n      \r\n    <div class=\"nav_wrapper\">\r\n      <div class=\"center_wrapper\">\r\n        <ul id=\"nav\">\r\n          <li><a href=\"#\">清体排毒</a>\r\n          <div class=\"bottombg ml40\">\r\n          <ul >\r\n         \r\n            <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",113));

	templateBuilder.Append("\"> 什么是毒素</a></li>\r\n           <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",112));

	templateBuilder.Append("\">我需要排毒么</a></li>\r\n             \r\n             \r\n          </ul>\r\n          </div>\r\n          </li>\r\n\r\n          <li>\r\n            <a href=\"#\">JuiceUp</a>\r\n            <div class=\"bottombg ml40\">\r\n            <ul >\r\n             \r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",110));

	templateBuilder.Append("\">最专业的JuiceUp</a></li>\r\n\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",111));

	templateBuilder.Append("\">果汁餐单</a></li>\r\n                <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",122));

	templateBuilder.Append("\">冷压技术</a></li>\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",126));

	templateBuilder.Append("\">温馨提示</a></li>\r\n               <span class=\"bottombg\"></span>\r\n             \r\n            </ul>\r\n            </div>\r\n          </li>\r\n          <li>\r\n            <a href=\"#\">选择您的果汁</a>\r\n            <div class=\"bottombg ml22\">\r\n            <ul >\r\n           \r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",114));

	templateBuilder.Append("\">level1美味纤体系列</a></li>\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",115));

	templateBuilder.Append("\">level2深层清体系列</a></li>\r\n             \r\n              \r\n             <!-- <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",117));

	templateBuilder.Append("\">个性化搭配</a></li>-->\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",123));

	templateBuilder.Append("\">在线测试</a></li>\r\n              <!--<li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",118));

	templateBuilder.Append("\">排毒疗程</a></li>-->\r\n              <span class=\"bottombg\"></span>\r\n            </ul>\r\n            </div>\r\n          </li>\r\n          <li>\r\n            <a href=\"#\">价格及配送</a>\r\n            <div class=\"bottombg ml30\">\r\n            <ul >\r\n          \r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",119));

	templateBuilder.Append("\">价格&优惠</a></li>\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",121));

	templateBuilder.Append("\">物流配送</a></li>\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",120));

	templateBuilder.Append("\">订购须知</a></li>\r\n              <span class=\"bottombg\"></span>\r\n            </ul>\r\n            </div>\r\n          </li>\r\n          <li><a href=\"");
	templateBuilder.Append(linkurl("feedback"));

	templateBuilder.Append("\">联系我们</a></li>\r\n       \r\n        </ul>\r\n        <!--\r\n        <div class=\"cart\"><a href=\"");
	templateBuilder.Append(linkurl("goods"));

	templateBuilder.Append("\"><i>立即订购</i><span class=\"iconCart\"></span></a></div>\r\n        -->\r\n        <div class=\"cart\" id=\"cartTop\">\r\n          <a href=\"");
	templateBuilder.Append(linkurl("goods"));

	templateBuilder.Append("\"><span number=\"0\" class=\"cartimg1\"></span></a>\r\n        </div>\r\n        <div class=\"cart_pad\"><a href=\"");
	templateBuilder.Append(linkurl("goods"));

	templateBuilder.Append("\">立即订购</a></div>\r\n      </div>\r\n    </div>\r\n  </div>");


	templateBuilder.Append("\r\n<!--/Header-->\r\n  <div id=\"page_modules\">\r\n    <div class=\"center_wrapper\">\r\n      \r\n      <div class=\"boxwrap\">\r\n      <div class=\"left_con_m\">\r\n        <div class=\"tile_left_m\">\r\n          <div class=\"tile_zh\">juiceup 欢迎您！</div>\r\n          <div class=\"tile_en\"><em class=\"black\">MY</em><em class=\"darkGreen\">JUICEUP</em><em class=\"lightGreen\">Welcome</em></div>\r\n        </div>\r\n        \r\n      </div>\r\n      <div  style=\" padding-top:100px;\">\r\n  <div class=\"left180\">\r\n    <!--Sidebar-->\r\n    ");

	templateBuilder.Append("    <style type=\"text/css\">\r\n.contentHead{ height:160px;}\r\n</style>\r\n    <div class=\"sidebar\">\r\n      <h3>交易管理</h3>\r\n      <ul>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("userorder","list"));

	templateBuilder.Append("\">我的订单</a></li>\r\n       <!-- <li><a href=\"");
	templateBuilder.Append(linkurl("userorder","close"));

	templateBuilder.Append("\">已关闭订单</a></li>-->\r\n      </ul>\r\n     \r\n      <h3>基本资料</h3>\r\n      <ul>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("usercenter","proinfo"));

	templateBuilder.Append("\">个人资料</a></li>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("usercenter","password"));

	templateBuilder.Append("\">修改密码</a></li>\r\n        <li><a href=\"");
	templateBuilder.Append(linkurl("usercenter","exit"));

	templateBuilder.Append("\">退出登录</a></li>\r\n      </ul>\r\n    </div>\r\n");


	templateBuilder.Append("\r\n    <!--/Sidebar-->\r\n  </div>\r\n  \r\n  <div class=\"right757\">\r\n    ");
	if (action=="index")
	{

	templateBuilder.Append("\r\n    <!--会员中心-->\r\n    <h1 class=\"main_tit\">\r\n      <span><a href=\"");
	templateBuilder.Append(linkurl("usercenter","exit"));

	templateBuilder.Append("\">退出</a></span>\r\n      会员中心\r\n      <strong>Profile</strong>\r\n    </h1>\r\n    <!--会员中心-->\r\n    <div class=\"main_head\">\r\n      <div class=\"avatarbox\">\r\n        ");
	if (userModel.avatar!="")
	{

	templateBuilder.Append("\r\n        <img src=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.avatar));
	templateBuilder.Append("\" />\r\n        ");
	}
	else
	{

	templateBuilder.Append("\r\n        <img src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/user_avatar.png\" alt=\"求真像\" />\r\n        ");
	}	//end for if

	templateBuilder.Append("\r\n        <span><a href=\"");
	templateBuilder.Append(linkurl("usercenter","avatar"));

	templateBuilder.Append("\">设置头像</a></span>\r\n      </div>\r\n      <div class=\"tips_box\">\r\n        <h3>尊敬的<span class=\"red\">");
	templateBuilder.Append(Utils.ObjectToStr(userModel.user_name));
	templateBuilder.Append("</span>，欢迎您！</h3>\r\n        <dl>\r\n          <dt>会员等级：</dt>\r\n          <dd>");
	templateBuilder.Append(Utils.ObjectToStr(groupModel.title));
	templateBuilder.Append("</dd>\r\n        </dl>\r\n        \r\n        \r\n       \r\n        <dl>\r\n          <dt>注册时间：</dt>\r\n          <dd>");
	templateBuilder.Append(Utils.ObjectToStr(userModel.reg_time));
	templateBuilder.Append("</dd>\r\n        </dl>\r\n        <dl>\r\n          <dt>上次登录时间：</dt>\r\n          <dd>");
	templateBuilder.Append(Utils.ObjectToStr(pre_login_time));
	templateBuilder.Append("</dd>\r\n        </dl>\r\n      </div>\r\n    </div>\r\n    <div class=\"line20\"></div>\r\n    <div class=\"tips_box\">\r\n      <h2>账户统计</h2>\r\n    \r\n      <dl>\r\n        <dt>账户积分：</dt>\r\n        <dd><b class=\"red\">");
	templateBuilder.Append(Utils.ObjectToStr(userModel.point));
	templateBuilder.Append("</b> 分</dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>未完成订单：</dt>\r\n        <dd><b class=\"red\">");
	templateBuilder.Append(get_user_order_count("status<3 and user_id="+userModel.id).ToString());

	templateBuilder.Append("</b> 个</dd>\r\n      </dl>\r\n     \r\n    </div>\r\n    <!--/会员中心-->\r\n    ");
	}
	else if (action=="password")
	{

	templateBuilder.Append("\r\n    <!--修改密码-->\r\n    <link rel=\"stylesheet\" href=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("css/validate.css\" />\r\n    <script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/jquery.form.min.js\"></");
	templateBuilder.Append("script>\r\n    <script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/Validform_v5.3.2_min.js\"></");
	templateBuilder.Append("script>\r\n    <script type=\"text/javascript\">\r\n        $(function () {\r\n            //初始化表单\r\n            AjaxInitForm('pwd_form', 'btnSubmit', 1);\r\n        });\r\n    </");
	templateBuilder.Append("script>\r\n    <h1 class=\"main_tit\">\r\n      <span><a href=\"");
	templateBuilder.Append(linkurl("usercenter","index"));

	templateBuilder.Append("\">管理首页</a></span>\r\n      修改密码\r\n      <strong>Password</strong>\r\n    </h1>\r\n    <form name=\"pwd_form\" id=\"pwd_form\" url=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("tools/submit_ajax.ashx?action=user_password_edit\">\r\n    <div class=\"form_box\">\r\n      <dl>\r\n        <dt>用户名：</dt>\r\n        <dd>");
	templateBuilder.Append(Utils.ObjectToStr(userModel.user_name));
	templateBuilder.Append("</dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>旧密码：</dt>\r\n        <dd><input name=\"txtOldPassword\" id=\"txtOldPassword\" type=\"password\" class=\"input txt\" datatype=\"*6-20\" nullmsg=\"请输入旧密码\" errormsg=\"密码范围在6-20位之间\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>新密码：</dt>\r\n        <dd><input name=\"txtPassword\" id=\"txtPassword\" type=\"password\" class=\"input txt\" datatype=\"*6-20\" nullmsg=\"请输入密码\" errormsg=\"密码范围在6-20位之间\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>确认新密码：</dt>\r\n        <dd><input name=\"txtPassword1\" id=\"txtPassword1\" type=\"password\" class=\"input txt\" datatype=\"*\" recheck=\"txtPassword\" nullmsg=\"请再输入一次密码\" errormsg=\"两次输入的密码不一致\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt></dt>\r\n        <dd><input name=\"btnSubmit\" id=\"btnSubmit\" type=\"submit\" class=\"btn_submit\" value=\"确认修改\" /></dd>\r\n      </dl>\r\n    </div>\r\n    </form>\r\n    <!--/修改密码-->\r\n    ");
	}
	else if (action=="proinfo")
	{

	templateBuilder.Append("\r\n    <!--修改资料-->\r\n    <link rel=\"stylesheet\" href=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("css/validate.css\" />\r\n    <script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/jquery.form.min.js\"></");
	templateBuilder.Append("script>\r\n    <script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/Validform_v5.3.2_min.js\"></");
	templateBuilder.Append("script>\r\n    <script type=\"text/javascript\">\r\n        $(function () {\r\n            //初始化表单\r\n            AjaxInitForm('info_form', 'btnSubmit', 1);\r\n        });\r\n    </");
	templateBuilder.Append("script>\r\n    <form name=\"info_form\" id=\"info_form\" url=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("tools/submit_ajax.ashx?action=user_info_edit\">\r\n    <h1 class=\"main_tit\">\r\n      <span><a href=\"");
	templateBuilder.Append(linkurl("usercenter","index"));

	templateBuilder.Append("\">管理首页</a></span>\r\n      个人资料\r\n      <strong>Information</strong>\r\n    </h1>\r\n    \r\n    <div class=\"form_box\">\r\n      <dl>\r\n        <dt>用户名：</dt>\r\n        <dd>");
	templateBuilder.Append(Utils.ObjectToStr(userModel.user_name));
	templateBuilder.Append("</dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>Email：</dt>\r\n        <dd><input name=\"txtEmail\" id=\"txtEmail\" type=\"text\" class=\"input txt\" maxlength=\"50\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.email));
	templateBuilder.Append("\"  datatype=\"e\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>昵称：</dt>\r\n        <dd><input name=\"txtNickName\" id=\"txtNickName\" type=\"text\" class=\"input txt\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.nick_name));
	templateBuilder.Append("\" datatype=\"*\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>性别：</dt>\r\n        <dd>\r\n          ");
	if (userModel.sex=="男")
	{

	templateBuilder.Append("\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"男\" checked=\"checked\" />男</label> \r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"女\" />女</label>\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"保密\" datatype=\"*\" sucmsg=\" \" />保密</label>\r\n            ");
	}
	else if (userModel.sex=="女")
	{

	templateBuilder.Append("\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"男\" />男</label>\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"女\" checked=\"checked\" />女</label>\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"保密\" datatype=\"*\" sucmsg=\" \" />保密</label>\r\n            ");
	}
	else
	{

	templateBuilder.Append("\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"男\" />男</label>\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"女\" />女</label>\r\n            <label><input name=\"rblSex\" type=\"radio\" value=\"保密\" checked=\"checked\" datatype=\"*\" sucmsg=\" \" />保密</label>\r\n            ");
	}	//end for if

	templateBuilder.Append("\r\n        </dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>生日：</dt>\r\n        <dd>\r\n          ");
	if (userModel.birthday==null)
	{

	templateBuilder.Append("\r\n          <input name=\"txtBirthday\" id=\"txtBirthday\" type=\"text\" class=\"input txt required dateISO\" maxlength=\"30\" onclick=\"return Calendar('txtBirthday');\" />\r\n          ");
	}
	else
	{

	templateBuilder.Append("\r\n          <input name=\"txtBirthday\" id=\"txtBirthday\" type=\"text\" class=\"input txt required dateISO\" maxlength=\"30\" onclick=\"return Calendar('txtBirthday');\" value=\"");	templateBuilder.Append(Utils.ObjectToDateTime(userModel.birthday).ToString("yyyy-M-d"));

	templateBuilder.Append("\" />\r\n          ");
	}	//end for if

	templateBuilder.Append("\r\n        </dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>联系电话：</dt>\r\n        <dd><input name=\"txtTelphone\" id=\"txtTelphone\" type=\"text\" class=\"input txt\" maxlength=\"50\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.telphone));
	templateBuilder.Append("\" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>手机号码：</dt>\r\n        <dd><input name=\"txtMobile\" id=\"txtMobile\" type=\"text\" class=\"input txt\" maxlength=\"20\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.mobile));
	templateBuilder.Append("\" datatype=\"*\" sucmsg=\" \" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>微信号：</dt>\r\n        <dd><input name=\"txtQQ\" id=\"txtQQ\" type=\"text\" class=\"input txt\" maxlength=\"20\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.qq));
	templateBuilder.Append("\" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt>联系地址：</dt>\r\n        <dd><input name=\"txtAddress\" id=\"txtAddress\" type=\"text\" class=\"input wide\" maxlength=\"250\" value=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.address));
	templateBuilder.Append("\" /></dd>\r\n      </dl>\r\n      <dl>\r\n        <dt></dt>\r\n        <dd><input name=\"btnSubmit\" id=\"btnSubmit\" type=\"submit\" class=\"btn_submit\" value=\"确认修改\" /></dd>\r\n      </dl>\r\n    </div>\r\n    </form>\r\n    <!--/修改资料-->\r\n    ");
	}
	else if (action=="avatar")
	{

	templateBuilder.Append("\r\n    <!--设置头像-->\r\n    <link rel=\"stylesheet\" href=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("css/jquery.jcrop.css\" type=\"text/css\" />\r\n    <script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/jquery.form.min.js\"></");
	templateBuilder.Append("script>\r\n    <script src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/jquery/jquery.jcrop.min.js\" type=\"text/javascript\"></");
	templateBuilder.Append("script>\r\n    <script src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/js/avatar.js\" type=\"text/javascript\"></");
	templateBuilder.Append("script>\r\n    <h1 class=\"main_tit\">\r\n      <span><a href=\"");
	templateBuilder.Append(linkurl("usercenter","index"));

	templateBuilder.Append("\">管理首页</a></span>\r\n      头像设置\r\n      <strong>Avatar</strong>\r\n    </h1>\r\n    \r\n    <strong>当前我的头像</strong>\r\n    <p>如果您还没有设置自己的头像，系统会显示为默认头像，您需要自己上传一张新照片来作为自己的个人头像。</p>\r\n    <div class=\"img_box\">\r\n      ");
	if (userModel.avatar!="")
	{

	templateBuilder.Append("\r\n        <img src=\"");
	templateBuilder.Append(Utils.ObjectToStr(userModel.avatar));
	templateBuilder.Append("\" width=\"180\" height=\"180\" />\r\n      ");
	}
	else
	{

	templateBuilder.Append("\r\n        <img src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/user_avatar.png\" width=\"180\" height=\"180\" />\r\n      ");
	}	//end for if

	templateBuilder.Append("\r\n    </div>\r\n    <strong>设置我的新头像</strong>\r\n    <p>上传成功后，请裁剪合适的头像确认保存后才能生效。</p>\r\n    <form id=\"upload_form\" name=\"upload_form\">\r\n      <div class=\"avatar_upload\">\r\n        <a href=\"javascript:;\" class=\"files\"><input type=\"file\" id=\"Filedata\" name=\"Filedata\" onchange=\"Upload('");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("');\" /></a>\r\n        <span class=\"uploading\">正在上传，请稍候...</span>\r\n      </div>\r\n      <div class=\"clear\"></div>\r\n      <div class=\"avatar_box\">\r\n        <div class=\"avatar_big_warp\">\r\n          <div class=\"avatar_big_box\">\r\n            <div class=\"avatar_big_pic\">\r\n              <img id=\"target\" src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/pic_bg.png\" />\r\n            </div>\r\n          </div>\r\n        </div>\r\n        <div class=\"avatar_small_warp\">\r\n          <div class=\"avatar_small_box\">\r\n            <div class=\"avatar_small_pic\"><img id=\"preview\" src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/pic_bg.png\" /></div>\r\n          </div>\r\n          <p style=\"text-align:center;\"><strong>头像预览区</strong></p>\r\n          <p style=\"text-align:center;\"><input id=\"btnSubmit\" name=\"btnSubmit\" type=\"button\" class=\"btn btn-success\" value=\"确定保存\" onclick=\"CropSubmit('");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("');return false;\" /></p>\r\n          <p>提示：生成头像大小180*180相素上传图片后，左侧选取图片合适大小，点击下面的保存按钮。</p>\r\n        </div>\r\n      </div>\r\n      <input id=\"hideFileName\" name=\"hideFileName\" type=\"hidden\" />\r\n      <input id=\"hideX1\" name=\"hideX1\" type=\"hidden\" value=\"0\" />\r\n      <input id=\"hideY1\" name=\"hideY1\" type=\"hidden\" value=\"0\" />\r\n      <input id=\"hideWidth\" name=\"hideWidth\" type=\"hidden\" value=\"0\" />\r\n      <input id=\"hideHeight\" name=\"hideHeight\" type=\"hidden\" value=\"0\" />\r\n    </form>\r\n    <!--/设置头像-->\r\n    ");
	}
	else if (action=="invite")
	{

	templateBuilder.Append("\r\n    <!--邀请码-->\r\n    <h1 class=\"main_tit\">\r\n      <span><a href=\"javascript:;\" onclick=\"clickSubmit('");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("tools/submit_ajax.ashx?action=user_invite_code');\">申请邀请码</a></span>\r\n      我的邀请码\r\n      <strong>Invite</strong>\r\n    </h1>\r\n    \r\n    <p>说明：您购买的邀请码会在失效之后由系统定时清理，不会长期驻留在列表中</p>\r\n    <div class=\"line10\"></div>\r\n    <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"ftable\">\r\n      <tr>\r\n        <th align=\"left\">邀请码</th>\r\n        <th width=\"150\">申请时间</th>\r\n        <th width=\"150\">过期时间</th>\r\n        <th width=\"80\">已使用次数</th>\r\n        <th width=\"80\">状态</th>\r\n      </tr>\r\n      ");
	DataTable list1 = get_user_invite_list(0, "user_name='"+userModel.user_name+"'");

	templateBuilder.Append(" <!--取得一个DataTable-->\r\n      ");
	int dr__loop__id=0;
	foreach(DataRow dr in list1.Rows)
	{
		dr__loop__id++;


	templateBuilder.Append("\r\n      <tr>\r\n        <td>" + Utils.ObjectToStr(dr["str_code"]) + " &nbsp; <a href=\"javascript:;\" onclick=\"copyText('邀请码：" + Utils.ObjectToStr(dr["str_code"]) + "');\">[复制]</a></td>\r\n        <td align=\"center\">" + Utils.ObjectToStr(dr["add_time"]) + "</td>\r\n        <td align=\"center\">\r\n          ");
	if (Utils.ObjectToStr(dr["eff_time"])=="")
	{

	templateBuilder.Append("\r\n          无限制\r\n          ");
	}
	else
	{

	templateBuilder.Append("\r\n          " + Utils.ObjectToStr(dr["eff_time"]) + "\r\n          ");
	}	//end for if

	templateBuilder.Append("\r\n        </td>\r\n        <td align=\"center\">" + Utils.ObjectToStr(dr["count"]) + "</td>\r\n        <td align=\"center\">\r\n          ");
	if (get_invite_status(Utils.ObjectToStr(dr["str_code"])))
	{

	templateBuilder.Append("\r\n          有效\r\n          ");
	}
	else
	{

	templateBuilder.Append("\r\n          已失效\r\n          ");
	}	//end for if

	templateBuilder.Append("\r\n        </td>\r\n      </tr>\r\n      ");
	}	//end for if

	if (list1.Rows.Count<1)
	{

	templateBuilder.Append("\r\n      <tr><td align=\"center\" colspan=\"5\">暂无记录</td></tr>\r\n      ");
	}	//end for if

	templateBuilder.Append("\r\n    </table>\r\n    <!--/邀请码-->\r\n    ");
	}	//end for if

	templateBuilder.Append("\r\n    \r\n  </div>\r\n  </div>\r\n  <div class=\"clear\"></div>\r\n</div>\r\n      </div>\r\n\r\n\r\n</div>\r\n\r\n<!--Footer-->\r\n");

	templateBuilder.Append(" <div id=\"footer_modules\">\r\n ");
	if (indexv==1)
	{

	templateBuilder.Append("\r\n <div class=\"ind_news\">\r\n <style>\r\n\r\n  .focus_tab{margin:4px auto 0;position:relative;  }\r\n  .focusPic{width:708px;overflow:hidden; margin-left: auto;\r\nmargin-right: auto;}\r\n\r\n\r\n\r\n.sidePic{float:right;list-style:none;}\r\n .sidePic li{\r\n	 width:21px;text-align:center;height:24px;line-height:26px;float:left;margin-right:7px;color:#2B2B2B; background: cursor:pointer;\r\n }\r\n.focus_tab .normal{float:left;margin-right:10px;}\r\n  </style>\r\n     <div id=\"s\"  class=\"focusPic\">\r\n        <div id=\"noticeList\" class=\"focus_tab\">\r\n          ");
	DataTable category_list2 = get_article_list("news", 39, 10, "status=0", "click desc,id desc");

	int cdr2__loop__id=0;
	foreach(DataRow cdr2 in category_list2.Rows)
	{
		cdr2__loop__id++;


	templateBuilder.Append("\r\n          <span class=\"normal\">" + Utils.ObjectToStr(cdr2["content"]) + "</span>\r\n          ");
	}	//end for if

	templateBuilder.Append("\r\n        </div>\r\n     </div>\r\n          \r\n  	 <div><a class=\"btn\" href=\"");
	templateBuilder.Append(linkurl("goods"));

	templateBuilder.Append("\">选择您的排毒计划</a> </div>\r\n  </div>\r\n\r\n<script type=\"text/javascript\">\r\n\r\n $(function(){\r\n	var itemWidth=$(\".focus_tab > .normal\").width()+10;\r\n	var sumWidth=itemWidth*$(\".focus_tab > .normal\").length;\r\n	var temp=$(\".focus_tab > div\").clone();\r\n	temp.appendTo(\".focus_tab\");\r\n	$(\".focus_tab\").width(sumWidth*2);\r\n	var i=0;\r\n	setInterval(play,18);\r\n	function play(){\r\n		//$(\".focus_tab\").offset({left:i,top:$(\".focus_tab\").offset().top});\r\n		$(\".focus_tab\").css(\"left\",i)\r\n		i-=1;\r\n		//if(Math.abs($(\".focus_tab\").offset().left)>=sumWidth)\r\n		if(Math.abs(parseInt($(\".focus_tab\").css(\"left\")))>=sumWidth){\r\n			i=0;\r\n		}\r\n	}\r\n });\r\n\r\n    	   \r\n	</");
	templateBuilder.Append("script>\r\n    ");
	}	//end for if

	templateBuilder.Append("\r\n   <script type=\"text/javascript\" src=\"");
	templateBuilder.Append(Utils.ObjectToStr(config.webpath));
	templateBuilder.Append("scripts/lhgdialog/lhgdialog.js?skin=idialog_1\">\r\n      </");
	templateBuilder.Append("script>\r\n      <script type=\"text/javascript\">\r\n       //放大图片\r\n       $(function () {\r\n           \r\n           $(\".imgtip\").click(function (e) {\r\n              \r\n               var dialog = $.dialog({\r\n                   title: '查看二维码',\r\n                   content: \"<img src='");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/weixin-01.jpg' />\",\r\n                   min: false,\r\n                   max: false,\r\n                  lock: true,\r\n                   width: 200,\r\n                   height: 200\r\n               });\r\n           });\r\n         \r\n       });\r\n       function divshow(str)\r\n       {\r\n        \r\n              \r\n               var dialog = $.dialog({\r\n                   title: str,\r\n                   content: \"<div class='layer_giftCard'><div class='gc_right_con'> <p>\"+str+\"敬请期待</p></div></div> \",\r\n                   min: false,\r\n                   max: false,\r\n                  lock: true,\r\n                   width: 200,\r\n                   height: 100\r\n               });\r\n          \r\n       }\r\n</");
	templateBuilder.Append("script>\r\n  <script>\r\n                function submitTest() {\r\n                    if ($(\"#pad\").val() == \"\")\r\n                    { return false; }\r\n                    else {\r\n                        location.href = 'feedback.aspx?con=' + $('#pad').val();\r\n                        //return true;\r\n                    }\r\n                }\r\n</");
	templateBuilder.Append("script>\r\n    <div class=\"social\">\r\n      <div class=\"socialWrapper\">\r\n      <a href=\"http://weibo.com/juiceupcleanse\"><img src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/sinaIcon.png\" /><em>官方微博</em></a>\r\n      <a href=\"javascript:void(0);\" class=\"imgtip\"><img src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/wxIocn.png\" /><em>官方微信</em></a>\r\n      <a href=\"javascript:void(0);\"  onclick=\"divshow('官方微视')\"><img src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/wsIcon.png\" /><em>官方微视</em></a>\r\n      <a href=\"javascript:void(0);\"  onclick=\"divshow('密友分享')\"><img src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/myIcon.png\" /><em>密友分享</em></a>\r\n      <a href=\"javascript:void(0);\"  onclick=\"divshow('Instagram')\"><img src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/instagramIcon.png\" /><em>Instagram</em></a>\r\n      </div>\r\n    </div>\r\n    <div class=\"footer_con\">\r\n      <div class=\"center_wrapper\">\r\n        <div class=\"inner\">\r\n          <div class=\"inner_list\">\r\n            <h2><a href=\"#footer1\">清体排毒</a></h2>\r\n            <ul id=\"footer1\">\r\n            <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",113));

	templateBuilder.Append("\"> 什么是毒素</a></li>\r\n           <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",112));

	templateBuilder.Append("\">我需要排毒么</a></li>\r\n             \r\n            </ul>\r\n          </div>\r\n          <div class=\"inner_list\">\r\n            <h2><a href=\"#footer2\">JuiceUp</a></h2>\r\n            <ul id=\"footer2\">\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",110));

	templateBuilder.Append("\">最专业的JuiceUp</a></li>\r\n\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",111));

	templateBuilder.Append("\">果汁餐单</a></li>\r\n                <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",122));

	templateBuilder.Append("\">冷压技术</a></li>\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",126));

	templateBuilder.Append("\">温馨提示</a></li>\r\n            </ul>\r\n          </div>\r\n          <div class=\"inner_list\">\r\n            <h2><a href=\"#footer3\">选择您的果汁</a></h2>\r\n            <ul id=\"footer3\">\r\n          <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",114));

	templateBuilder.Append("\">level1美味纤体系列</a></li>\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",115));

	templateBuilder.Append("\">level2深层清体系列</a></li>\r\n             \r\n              \r\n             <!-- <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",117));

	templateBuilder.Append("\">个性化搭配</a></li>-->\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",123));

	templateBuilder.Append("\">在线测试</a></li>\r\n            </ul>\r\n          </div>\r\n          <div class=\"inner_list\">\r\n            <h2><a href=\"#footer4\">价格及配送</a></h2>\r\n            <ul id=\"footer4\">\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",119));

	templateBuilder.Append("\">价格&优惠</a></li>\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",121));

	templateBuilder.Append("\">物流配送</a></li>\r\n              <li><a href=\"");
	templateBuilder.Append(linkurl("contentshow",120));

	templateBuilder.Append("\">订购须知</a></li>\r\n            </ul>\r\n          </div>\r\n          <ul class=\"inner_contact\">\r\n            <h2><a href=\"");
	templateBuilder.Append(linkurl("feedback"));

	templateBuilder.Append("\">联系我们</a></h2>\r\n            <p class=\"tile\"><img src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/emailIcon.png\" />&nbsp;提交留言</p>\r\n            <p class=\"form_con\">\r\n              <input class=\"t_tet\" value=\"我感觉咱们产品\" id=\"pad\" type=\"text\"/>\r\n              <input class=\"t_button\" value=\"提交\" type=\"button\" onclick=\"submitTest();\"  />\r\n            </p>\r\n            <img src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/images/juiceUpCar.png\" />\r\n          </ul>\r\n          <div class=\"footer_contact\">\r\n            <span class=\"tet\"><span class=\"inlineBlock\">CONTACT US</span>&nbsp;&nbsp;<span class=\"inlineBlock\"><a href=\"mailto:order@juiceupcleanse.com\">order@juiceupcleanse.com</a></span>&nbsp;&nbsp;<span class=\"inlineBlock\">  400-082-5955</span></span>\r\n            <span class=\"cp\">&copy; 2014 JuiceUpCleanse. All rights reserved. </span>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n  <!---->\r\n  <div class=\"go_top\">返回顶端</div>\r\n  <!---->\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<script type=\"text/javascript\" src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/js/juiceup.js\"></");
	templateBuilder.Append("script>\r\n<!-- include jQuery + carouFredSel plugin -->\r\n<script type=\"text/javascript\" src=\"");
	templateBuilder.Append("/templates/JuiceUp");
	templateBuilder.Append("/js/jquery.glide.min.js\"></");
	templateBuilder.Append("script>\r\n\r\n<script type=\"text/javascript\">\r\n ");
	if (indexv==1)
	{

	}
	else
	{

	templateBuilder.Append("\r\n    $('.slidejuice').glide({});\r\n    ");
	}	//end for if

	templateBuilder.Append("\r\n</");
	templateBuilder.Append("script>\r\n\r\n\r\n\r\n\r\n</body>\r\n</html>");


	templateBuilder.Append("\r\n<!--/Footer-->");
	Response.Write(templateBuilder.ToString());
}
</script>
